<?php

namespace Models;

class SuccessLogins extends \Phalcon\Mvc\Model
{

    /**
     *
     * @var integer
     */
    public $id;

    /**
     *
     * @var integer
     */
    public $usersId;

    /**
     *
     * @var string
     */
    public $ipAddress;

    /**
     *
     * @var string
     */
    public $userAgent;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        $this->setSource('Success_logins');
        
        $this->belongsTo('usersId', 'Sma\Admin\Models\Users', 'id', array(
			'alias' => 'user'
		));
    }

    /**
     * Independent Column Mapping.
     */
    public function columnMap()
    {
        return array(
            'id' => 'id', 
            'usersId' => 'usersId', 
            'ipAddress' => 'ipAddress', 
            'userAgent' => 'userAgent'
        );
    }
    
    

}
